// DriveNotes. Copyright (c) 2011, Andrei Senchuk. All rights reserved.
package net.taviscaron.drivenotes.shared.model.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * Note entity object
 * @author Andrei Senchuk
 */
public class Note implements Serializable {
    private Long id;
    private User author;
    private String name;
    private String note;
    private Date createTime;
    private Date editTime;
    private Boolean _public;

    public Note() {
    }

    public Boolean getPublic() {
        return _public;
    }

    public void setPublic(Boolean _public) {
        this._public = _public;
    }

    public User getAuthor() {
        return author;
    }

    public void setAuthor(User author) {
        this.author = author;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getEditTime() {
        return editTime;
    }

    public void setEditTime(Date editTime) {
        this.editTime = editTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Override
    public String toString() {
        return String.format("Note #%d: author: [%s]; name: %s; note: %s; " +
                "created: %s; edited: %s; public: %s", id, author, name, note,
                createTime, editTime, _public);
    }
}
